package com.zz.parkingsystem.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 主策略表
 * @TableName t_strategy
 */
@Data
public class Strategy implements Serializable {
    /**
     * 策略id
     */
    private Integer stagyId;

    /**
     * 1:提供三十分钟免费停车  0：不提供
     */
    private Integer isFree;

    /**
     * 周内id
     */
    private Integer wdId;

    /**
     * 周末id
     */
    private Integer wedId;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Strategy other = (Strategy) that;
        return (this.getStagyId() == null ? other.getStagyId() == null : this.getStagyId().equals(other.getStagyId()))
            && (this.getIsFree() == null ? other.getIsFree() == null : this.getIsFree().equals(other.getIsFree()))
            && (this.getWdId() == null ? other.getWdId() == null : this.getWdId().equals(other.getWdId()))
            && (this.getWedId() == null ? other.getWedId() == null : this.getWedId().equals(other.getWedId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStagyId() == null) ? 0 : getStagyId().hashCode());
        result = prime * result + ((getIsFree() == null) ? 0 : getIsFree().hashCode());
        result = prime * result + ((getWdId() == null) ? 0 : getWdId().hashCode());
        result = prime * result + ((getWedId() == null) ? 0 : getWedId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", stagyId=").append(stagyId);
        sb.append(", isFree=").append(isFree);
        sb.append(", wdId=").append(wdId);
        sb.append(", wedId=").append(wedId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}